import request from '@/utils/request';

const flowerUserBaseURL = '/flowerUser'

    /**
     * 后台直接创建用户
     * @param flowerUser
     * @return
     */
export function createFlowerUser(data){
    return request({
        url: flowerUserBaseURL+'/createFlowerUser',
        method: 'post',
        data
    })
}

//用户正常注册
    /**
     * 前台用户注册(全为必要参数)
     * @param command
     * String username;
     * String email;
     * String password;
     * String nickname;
     * String captcha;
     * @return
     * Integer是否成功信息
     */
export function flowerUserRegister(data){
    return request({
        url: flowerUserBaseURL+'/flowerUserRegister',
        method: 'post',
        data
    })
}

    /**
     * 用户重置密码
     * @param command
     * String email;
     * String password;
     * String captcha;
     * @return
     * Integer是否成功信息
     */
export function flowerUserResetPassword(data){
    return request({
        url: flowerUserBaseURL+'/flowerUserResetPassword',
        method: 'post',
        data
    })
}



//存在检测根据用户名或邮箱判断是否存在
    /**
     * 用户存在判断
     * @param command
     * String username;
     * String email;
     * @return
     * 存在返回id
     * 不存在返回0
     */
export function flowerUserExistsTest(data){
    return request({
        url: flowerUserBaseURL+'/flowerUserExistsTest',
        method: 'post',
        data
    })
}




export function getFlowerUserDetailById(params){
    return request({
        url: flowerUserBaseURL+'/getFlowerUserDetailById',
        method: 'get',
        params
    })
}

export function deleteFlowerUserById(data){
    return request({
        url: flowerUserBaseURL+'/deleteFlowerUserById',
        method: 'post',
        data
    })
}

export function updateFlowerUser(data){
    return request({
        url: flowerUserBaseURL+'/updateFlowerUser',
        method: 'post',
        data
    })
}

export function getFlowerUserPage(params){
    return request({
        url: flowerUserBaseURL+'/getFlowerUserPage',
        method: 'get',
        params
    })
}

export function getAllFlowerUserData(params){
    return request({
        url: flowerUserBaseURL+'/getAllFlowerUserData',
        method: 'get',
        params
    })
}

export function getFlowerUserTotalCount(params){
    return request({
        url: flowerUserBaseURL+'/getFlowerUserTotalCount',
        method: 'get',
        params
    })
}



